Correct the math to calculate bilinear weights. (#112412, Brian Cameron)
authorMatthias Clasen <maclas@gmx.de>
Sat, 3 Jul 2004 05:29:03 +0000 (05:29 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 3 Jul 2004 05:29:03 +0000 (05:29 +0000)
Sat Jul  3 00:41:44 2004  Matthias Clasen  <maclas@gmx.de>

* pixops/pixops.c (bilinear_box_make_weights): Correct the
math to calculate bilinear weights. (#112412, Brian Cameron)

gdk-pixbuf/ChangeLog
gdk-pixbuf/pixops/pixops.c

index 64a6f7764fbc87c0180d2a1b2fcfaabc726239a6..8716efd959f008791fc579b7afc5da3600c2cbf2 100644 (file)
@@ -1,3 +1,8 @@
+Sat Jul  3 00:41:44 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * pixops/pixops.c (bilinear_box_make_weights): Correct the
+       math to calculate bilinear weights. (#112412, Brian Cameron)
+
 Mon Jun 21 00:44:51 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gdk-pixbuf-transform.h: 
index e4a086c2f04326a73e348332b5e9625a6f2cc4c5..6f629d90ba2a150acf3d7f32ab5ca5c570d587ba 100644 (file)
@@ -1312,7 +1312,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim,
   dim->n = n;
   dim->weights = pixel_weights;
 
-  for (offset =; offset < SUBSAMPLE; offset++)
+  for (offset = 0; offset < SUBSAMPLE; offset++)
     {
       double x = (double)offset / SUBSAMPLE;
       double a = x + 1 / scale;
@@ -1320,7 +1320,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim,
       for (i = 0; i < n; i++)
         {
           w  = linear_box_half (0.5 + i - a, 0.5 + i - x);
-          w += linear_box_half (1.5 + x - i, 1.5 + a - i);
+          w += linear_box_half (0.5 + x - i, 0.5 + a - i);
       
           *(pixel_weights++) = w * scale;
         }